#include <stdio.h>

int m, n;

unsigned int comb[110][110];

int main() {
	for (int i=0; i<102; i++) {
		comb[i][0]=1;
		comb[i][i]=1;		
	}

	for (int i=1; i<102; i++) {
		for (int j=1; j<102; j++) {
			comb[i][j]=comb[i-1][j-1]+comb[i-1][j];
		}
	}

	while (1) {
		scanf("%d %d", &n, &m);

		if (!n && !m) break;

		printf("%d things taken %d at a time is %u exactly.\n", n, m, comb[n][m]);
	}

	return 0;
}
